package com.vjwealth.android.nos.base

import android.app.Application
import com.vjwealth.android.nos.utils.ActivityManagerUtils
import com.vjwealth.android.nos.utils.SPUtils

/**
 * projectName KNOS
 * date 2017/9/26
 * description com.vjwealth.android.nos.base
 */
class BaseApplication private constructor(){

    private object SingletonHolder{
        var INSTANCE = BaseApplication()
    }

    companion object {
        val instance = SingletonHolder.INSTANCE
        var activityManager = ActivityManagerUtils.instance
        var spInfor: SPUtils? = null
    }

    private var application: Application? = null


    fun init(app: Application){
        application = app
        spInfor = SPUtils(app, "userInfo")
    }

    fun getActivityManager(): ActivityManagerUtils {
        return activityManager
    }
}